﻿#region Using directives

using System;
using System.Data;
using System.Data.Common;
using System.Collections;
using System.Collections.Generic;

using BesAsm.MasterData.Entities;
using BesAsm.MasterData.Data;

#endregion

namespace BesAsm.MasterData.Data.Bases
{	
	///<summary>
	/// This class is the base class for any <see cref="NodeProviderBase"/> implementation.
	/// It exposes CRUD methods as well as selecting on index, foreign keys and custom stored procedures.
	///</summary>
	public abstract partial class NodeProviderBaseCore : EntityProviderBase<BesAsm.MasterData.Entities.Node, BesAsm.MasterData.Entities.NodeKey>
	{		
		#region Get from Many To Many Relationship Functions
		#endregion	
		
		#region Delete Methods

		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to delete.</param>
		/// <returns>Returns true if operation suceeded.</returns>
		public override bool Delete(TransactionManager transactionManager, BesAsm.MasterData.Entities.NodeKey key)
		{
			return Delete(transactionManager, key.NodeName);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="_nodeName">Primary key.  Node id.. Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public bool Delete(System.String _nodeName)
		{
			return Delete(null, _nodeName);
		}
		
		/// <summary>
		/// 	Deletes a row from the DataSource.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeName">Primary key.  Node id.. Primary Key.</param>
		/// <remarks>Deletes based on primary key(s).</remarks>
		/// <returns>Returns true if operation suceeded.</returns>
		public abstract bool Delete(TransactionManager transactionManager, System.String _nodeName);		
		
		#endregion Delete Methods
		
		#region Get By Foreign Key Functions
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_DATA_SOURCES key.
		///		FK_NODES_DATA_SOURCES Description: 
		/// </summary>
		/// <param name="_dataQuality">Source of data for node</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByDataQuality(System.String _dataQuality)
		{
			int count = -1;
			return GetByDataQuality(_dataQuality, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_DATA_SOURCES key.
		///		FK_NODES_DATA_SOURCES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_dataQuality">Source of data for node</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		/// <remarks></remarks>
		public TList<Node> GetByDataQuality(TransactionManager transactionManager, System.String _dataQuality)
		{
			int count = -1;
			return GetByDataQuality(transactionManager, _dataQuality, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_DATA_SOURCES key.
		///		FK_NODES_DATA_SOURCES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_dataQuality">Source of data for node</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByDataQuality(TransactionManager transactionManager, System.String _dataQuality, int start, int pageLength)
		{
			int count = -1;
			return GetByDataQuality(transactionManager, _dataQuality, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_DATA_SOURCES key.
		///		fkNodesDataSources Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_dataQuality">Source of data for node</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByDataQuality(System.String _dataQuality, int start, int pageLength)
		{
			int count =  -1;
			return GetByDataQuality(null, _dataQuality, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_DATA_SOURCES key.
		///		fkNodesDataSources Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_dataQuality">Source of data for node</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByDataQuality(System.String _dataQuality, int start, int pageLength,out int count)
		{
			return GetByDataQuality(null, _dataQuality, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_DATA_SOURCES key.
		///		FK_NODES_DATA_SOURCES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_dataQuality">Source of data for node</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public abstract TList<Node> GetByDataQuality(TransactionManager transactionManager, System.String _dataQuality, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_NODE_TYPES key.
		///		FK_NODES_NODE_TYPES Description: 
		/// </summary>
		/// <param name="_nodeType">Foreign key to NODE_TYPES</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByNodeType(System.String _nodeType)
		{
			int count = -1;
			return GetByNodeType(_nodeType, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_NODE_TYPES key.
		///		FK_NODES_NODE_TYPES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeType">Foreign key to NODE_TYPES</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		/// <remarks></remarks>
		public TList<Node> GetByNodeType(TransactionManager transactionManager, System.String _nodeType)
		{
			int count = -1;
			return GetByNodeType(transactionManager, _nodeType, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_NODE_TYPES key.
		///		FK_NODES_NODE_TYPES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeType">Foreign key to NODE_TYPES</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByNodeType(TransactionManager transactionManager, System.String _nodeType, int start, int pageLength)
		{
			int count = -1;
			return GetByNodeType(transactionManager, _nodeType, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_NODE_TYPES key.
		///		fkNodesNodeTypes Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_nodeType">Foreign key to NODE_TYPES</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByNodeType(System.String _nodeType, int start, int pageLength)
		{
			int count =  -1;
			return GetByNodeType(null, _nodeType, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_NODE_TYPES key.
		///		fkNodesNodeTypes Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_nodeType">Foreign key to NODE_TYPES</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByNodeType(System.String _nodeType, int start, int pageLength,out int count)
		{
			return GetByNodeType(null, _nodeType, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_NODE_TYPES key.
		///		FK_NODES_NODE_TYPES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeType">Foreign key to NODE_TYPES</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public abstract TList<Node> GetByNodeType(TransactionManager transactionManager, System.String _nodeType, int start, int pageLength, out int count);
		
	
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_STATUSES key.
		///		FK_NODES_STATUSES Description: 
		/// </summary>
		/// <param name="_status">Status of record, in terms of usability for further analysis and general state of data</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByStatus(System.String _status)
		{
			int count = -1;
			return GetByStatus(_status, 0,int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_STATUSES key.
		///		FK_NODES_STATUSES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_status">Status of record, in terms of usability for further analysis and general state of data</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		/// <remarks></remarks>
		public TList<Node> GetByStatus(TransactionManager transactionManager, System.String _status)
		{
			int count = -1;
			return GetByStatus(transactionManager, _status, 0, int.MaxValue, out count);
		}
		
			/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_STATUSES key.
		///		FK_NODES_STATUSES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_status">Status of record, in terms of usability for further analysis and general state of data</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		///  <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByStatus(TransactionManager transactionManager, System.String _status, int start, int pageLength)
		{
			int count = -1;
			return GetByStatus(transactionManager, _status, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_STATUSES key.
		///		fkNodesStatuses Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_status">Status of record, in terms of usability for further analysis and general state of data</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByStatus(System.String _status, int start, int pageLength)
		{
			int count =  -1;
			return GetByStatus(null, _status, start, pageLength,out count);	
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_STATUSES key.
		///		fkNodesStatuses Description: 
		/// </summary>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="_status">Status of record, in terms of usability for further analysis and general state of data</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public TList<Node> GetByStatus(System.String _status, int start, int pageLength,out int count)
		{
			return GetByStatus(null, _status, start, pageLength, out count);	
		}
						
		/// <summary>
		/// 	Gets rows from the datasource based on the FK_NODES_STATUSES key.
		///		FK_NODES_STATUSES Description: 
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_status">Status of record, in terms of usability for further analysis and general state of data</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns a typed collection of BesAsm.MasterData.Entities.Node objects.</returns>
		public abstract TList<Node> GetByStatus(TransactionManager transactionManager, System.String _status, int start, int pageLength, out int count);
		
		#endregion

		#region Get By Index Functions
		
		/// <summary>
		/// 	Gets a row from the DataSource based on its primary key.
		/// </summary>
		/// <param name="transactionManager">A <see cref="TransactionManager"/> object.</param>
		/// <param name="key">The unique identifier of the row to retrieve.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <returns>Returns an instance of the Entity class.</returns>
		public override BesAsm.MasterData.Entities.Node Get(TransactionManager transactionManager, BesAsm.MasterData.Entities.NodeKey key, int start, int pageLength)
		{
			return GetByNodeName(transactionManager, key.NodeName, start, pageLength);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key PK_NODES index.
		/// </summary>
		/// <param name="_nodeName">Primary key.  Node id.</param>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeName(System.String _nodeName)
		{
			int count = -1;
			return GetByNodeName(null,_nodeName, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_NODES index.
		/// </summary>
		/// <param name="_nodeName">Primary key.  Node id.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeName(System.String _nodeName, int start, int pageLength)
		{
			int count = -1;
			return GetByNodeName(null, _nodeName, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_NODES index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeName">Primary key.  Node id.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeName(TransactionManager transactionManager, System.String _nodeName)
		{
			int count = -1;
			return GetByNodeName(transactionManager, _nodeName, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_NODES index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeName">Primary key.  Node id.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeName(TransactionManager transactionManager, System.String _nodeName, int start, int pageLength)
		{
			int count = -1;
			return GetByNodeName(transactionManager, _nodeName, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_NODES index.
		/// </summary>
		/// <param name="_nodeName">Primary key.  Node id.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeName(System.String _nodeName, int start, int pageLength, out int count)
		{
			return GetByNodeName(null, _nodeName, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the PK_NODES index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeName">Primary key.  Node id.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public abstract BesAsm.MasterData.Entities.Node GetByNodeName(TransactionManager transactionManager, System.String _nodeName, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key R141_ROWID_SDE_UK index.
		/// </summary>
		/// <param name="_objectid"></param>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByObjectid(System.Int32 _objectid)
		{
			int count = -1;
			return GetByObjectid(null,_objectid, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the R141_ROWID_SDE_UK index.
		/// </summary>
		/// <param name="_objectid"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByObjectid(System.Int32 _objectid, int start, int pageLength)
		{
			int count = -1;
			return GetByObjectid(null, _objectid, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the R141_ROWID_SDE_UK index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_objectid"></param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByObjectid(TransactionManager transactionManager, System.Int32 _objectid)
		{
			int count = -1;
			return GetByObjectid(transactionManager, _objectid, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the R141_ROWID_SDE_UK index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_objectid"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByObjectid(TransactionManager transactionManager, System.Int32 _objectid, int start, int pageLength)
		{
			int count = -1;
			return GetByObjectid(transactionManager, _objectid, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the R141_ROWID_SDE_UK index.
		/// </summary>
		/// <param name="_objectid"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByObjectid(System.Int32 _objectid, int start, int pageLength, out int count)
		{
			return GetByObjectid(null, _objectid, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the R141_ROWID_SDE_UK index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_objectid"></param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public abstract BesAsm.MasterData.Entities.Node GetByObjectid(TransactionManager transactionManager, System.Int32 _objectid, int start, int pageLength, out int count);
						
		/// <summary>
		/// 	Gets rows from the datasource based on the primary key UQ_NODES_node_id index.
		/// </summary>
		/// <param name="_nodeId">Primary key, node_id</param>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeId(System.Int32 _nodeId)
		{
			int count = -1;
			return GetByNodeId(null,_nodeId, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the UQ_NODES_node_id index.
		/// </summary>
		/// <param name="_nodeId">Primary key, node_id</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeId(System.Int32 _nodeId, int start, int pageLength)
		{
			int count = -1;
			return GetByNodeId(null, _nodeId, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the UQ_NODES_node_id index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeId">Primary key, node_id</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeId(TransactionManager transactionManager, System.Int32 _nodeId)
		{
			int count = -1;
			return GetByNodeId(transactionManager, _nodeId, 0, int.MaxValue, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the UQ_NODES_node_id index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeId">Primary key, node_id</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeId(TransactionManager transactionManager, System.Int32 _nodeId, int start, int pageLength)
		{
			int count = -1;
			return GetByNodeId(transactionManager, _nodeId, start, pageLength, out count);
		}
		
		/// <summary>
		/// 	Gets rows from the datasource based on the UQ_NODES_node_id index.
		/// </summary>
		/// <param name="_nodeId">Primary key, node_id</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">out parameter to get total records for query</param>
		/// <remarks></remarks>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public BesAsm.MasterData.Entities.Node GetByNodeId(System.Int32 _nodeId, int start, int pageLength, out int count)
		{
			return GetByNodeId(null, _nodeId, start, pageLength, out count);
		}
		
				
		/// <summary>
		/// 	Gets rows from the datasource based on the UQ_NODES_node_id index.
		/// </summary>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="_nodeId">Primary key, node_id</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="count">The total number of records.</param>
		/// <returns>Returns an instance of the <see cref="BesAsm.MasterData.Entities.Node"/> class.</returns>
		public abstract BesAsm.MasterData.Entities.Node GetByNodeId(TransactionManager transactionManager, System.Int32 _nodeId, int start, int pageLength, out int count);
						
		#endregion "Get By Index Functions"
	
		#region Custom Methods
		
		
		#region USP_NODES_SELECT_OIDS_BY_NODE_IDS 
		
		/// <summary>
		///	This method wrap the 'USP_NODES_SELECT_OIDS_BY_NODE_IDS' stored procedure. 
		/// </summary>
		/// <param name="idTable"> A <c>System.Object</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet SelectOidsByNodeIds(System.Object idTable)
		{
			return SelectOidsByNodeIds(null, 0, int.MaxValue , idTable);
		}
		
		/// <summary>
		///	This method wrap the 'USP_NODES_SELECT_OIDS_BY_NODE_IDS' stored procedure. 
		/// </summary>
		/// <param name="idTable"> A <c>System.Object</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet SelectOidsByNodeIds(int start, int pageLength, System.Object idTable)
		{
			return SelectOidsByNodeIds(null, start, pageLength , idTable);
		}
				
		/// <summary>
		///	This method wrap the 'USP_NODES_SELECT_OIDS_BY_NODE_IDS' stored procedure. 
		/// </summary>
		/// <param name="idTable"> A <c>System.Object</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public DataSet SelectOidsByNodeIds(TransactionManager transactionManager, System.Object idTable)
		{
			return SelectOidsByNodeIds(transactionManager, 0, int.MaxValue , idTable);
		}
		
		/// <summary>
		///	This method wrap the 'USP_NODES_SELECT_OIDS_BY_NODE_IDS' stored procedure. 
		/// </summary>
		/// <param name="idTable"> A <c>System.Object</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="DataSet"/> instance.</returns>
		public abstract DataSet SelectOidsByNodeIds(TransactionManager transactionManager, int start, int pageLength , System.Object idTable);
		
		#endregion
		
		#region USP_NODES_SELECT_BY_OIDS 
		
		/// <summary>
		///	This method wrap the 'USP_NODES_SELECT_BY_OIDS' stored procedure. 
		/// </summary>
		/// <param name="idTable"> A <c>System.Object</c> instance.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="TList&lt;Node&gt;"/> instance.</returns>
		public TList<Node> SelectByOids(System.Object idTable)
		{
			return SelectByOids(null, 0, int.MaxValue , idTable);
		}
		
		/// <summary>
		///	This method wrap the 'USP_NODES_SELECT_BY_OIDS' stored procedure. 
		/// </summary>
		/// <param name="idTable"> A <c>System.Object</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="TList&lt;Node&gt;"/> instance.</returns>
		public TList<Node> SelectByOids(int start, int pageLength, System.Object idTable)
		{
			return SelectByOids(null, start, pageLength , idTable);
		}
				
		/// <summary>
		///	This method wrap the 'USP_NODES_SELECT_BY_OIDS' stored procedure. 
		/// </summary>
		/// <param name="idTable"> A <c>System.Object</c> instance.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="TList&lt;Node&gt;"/> instance.</returns>
		public TList<Node> SelectByOids(TransactionManager transactionManager, System.Object idTable)
		{
			return SelectByOids(transactionManager, 0, int.MaxValue , idTable);
		}
		
		/// <summary>
		///	This method wrap the 'USP_NODES_SELECT_BY_OIDS' stored procedure. 
		/// </summary>
		/// <param name="idTable"> A <c>System.Object</c> instance.</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">Number of rows to return.</param>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <remark>This method is generate from a stored procedure.</remark>
		/// <returns>A <see cref="TList&lt;Node&gt;"/> instance.</returns>
		public abstract TList<Node> SelectByOids(TransactionManager transactionManager, int start, int pageLength , System.Object idTable);
		
		#endregion
		
		#endregion

		#region Helper Functions	
		
		/// <summary>
		/// Fill a TList&lt;Node&gt; From a DataReader.
		/// </summary>
		/// <param name="reader">Datareader</param>
		/// <param name="rows">The collection to fill</param>
		/// <param name="start">Row number at which to start reading, the first row is 0.</param>
		/// <param name="pageLength">number of rows.</param>
		/// <returns>a <see cref="TList&lt;Node&gt;"/></returns>
		public static TList<Node> Fill(IDataReader reader, TList<Node> rows, int start, int pageLength)
		{
			NetTiersProvider currentProvider = DataRepository.Provider;
            bool useEntityFactory = currentProvider.UseEntityFactory;
            bool enableEntityTracking = currentProvider.EnableEntityTracking;
            LoadPolicy currentLoadPolicy = currentProvider.CurrentLoadPolicy;
			Type entityCreationFactoryType = currentProvider.EntityCreationalFactoryType;
			
			// advance to the starting row
			for (int i = 0; i < start; i++)
			{
				if (!reader.Read())
				return rows; // not enough rows, just return
			}
			for (int i = 0; i < pageLength; i++)
			{
				if (!reader.Read())
					break; // we are done
					
				string key = null;
				
				BesAsm.MasterData.Entities.Node c = null;
				if (useEntityFactory)
				{
					key = new System.Text.StringBuilder("Node")
					.Append("|").Append((System.String)reader[((int)NodeColumn.NodeName - 1)]).ToString();
					c = EntityManager.LocateOrCreate<Node>(
					key.ToString(), // EntityTrackingKey
					"Node",  //Creational Type
					entityCreationFactoryType,  //Factory used to create entity
					enableEntityTracking); // Track this entity?
				}
				else
				{
					c = new BesAsm.MasterData.Entities.Node();
				}
				
				if (!enableEntityTracking ||
					c.EntityState == EntityState.Added ||
					(enableEntityTracking &&
					
						(
							(currentLoadPolicy == LoadPolicy.PreserveChanges && c.EntityState == EntityState.Unchanged) ||
							(currentLoadPolicy == LoadPolicy.DiscardChanges && c.EntityState != EntityState.Unchanged)
						)
					))
				{
					c.SuppressEntityEvents = true;
					c.Objectid = (System.Int32)reader[((int)NodeColumn.Objectid - 1)];
					c.NodeName = (System.String)reader[((int)NodeColumn.NodeName - 1)];
					c.OriginalNodeName = c.NodeName;
					c.XCoord = (reader.IsDBNull(((int)NodeColumn.XCoord - 1)))?null:(System.Decimal?)reader[((int)NodeColumn.XCoord - 1)];
					c.YCoord = (reader.IsDBNull(((int)NodeColumn.YCoord - 1)))?null:(System.Decimal?)reader[((int)NodeColumn.YCoord - 1)];
					c.NodeType = (reader.IsDBNull(((int)NodeColumn.NodeType - 1)))?null:(System.String)reader[((int)NodeColumn.NodeType - 1)];
					c.GroundElevation = (System.Decimal)reader[((int)NodeColumn.GroundElevation - 1)];
					c.HasSpecialNode = (reader.IsDBNull(((int)NodeColumn.HasSpecialNode - 1)))?null:(System.Int32?)reader[((int)NodeColumn.HasSpecialNode - 1)];
					c.HasSpecialLink = (reader.IsDBNull(((int)NodeColumn.HasSpecialLink - 1)))?null:(System.Int32?)reader[((int)NodeColumn.HasSpecialLink - 1)];
					c.VirtualGageId = (reader.IsDBNull(((int)NodeColumn.VirtualGageId - 1)))?null:(System.String)reader[((int)NodeColumn.VirtualGageId - 1)];
					c.DmeGlobalId = (reader.IsDBNull(((int)NodeColumn.DmeGlobalId - 1)))?null:(System.Int32?)reader[((int)NodeColumn.DmeGlobalId - 1)];
					c.EditedBy = (System.String)reader[((int)NodeColumn.EditedBy - 1)];
					c.EditReason = (System.String)reader[((int)NodeColumn.EditReason - 1)];
					c.Status = (System.String)reader[((int)NodeColumn.Status - 1)];
					c.AppendDate = (System.DateTime)reader[((int)NodeColumn.AppendDate - 1)];
					c.EditDate = (reader.IsDBNull(((int)NodeColumn.EditDate - 1)))?null:(System.DateTime?)reader[((int)NodeColumn.EditDate - 1)];
					c.NodeId = (System.Int32)reader[((int)NodeColumn.NodeId - 1)];
					c.DataQuality = (reader.IsDBNull(((int)NodeColumn.DataQuality - 1)))?null:(System.String)reader[((int)NodeColumn.DataQuality - 1)];
					c.Shape = (reader.IsDBNull(((int)NodeColumn.Shape - 1)))?null:(System.Object)reader[((int)NodeColumn.Shape - 1)];
					c.EntityTrackingKey = key;
					c.AcceptChanges();
					c.SuppressEntityEvents = false;
				}
				rows.Add(c);
			}
		return rows;
		}		
		/// <summary>
		/// Refreshes the <see cref="BesAsm.MasterData.Entities.Node"/> object from the <see cref="IDataReader"/>.
		/// </summary>
		/// <param name="reader">The <see cref="IDataReader"/> to read from.</param>
		/// <param name="entity">The <see cref="BesAsm.MasterData.Entities.Node"/> object to refresh.</param>
		public static void RefreshEntity(IDataReader reader, BesAsm.MasterData.Entities.Node entity)
		{
			if (!reader.Read()) return;
			
			entity.Objectid = (System.Int32)reader[((int)NodeColumn.Objectid - 1)];
			entity.NodeName = (System.String)reader[((int)NodeColumn.NodeName - 1)];
			entity.OriginalNodeName = (System.String)reader["node_name"];
			entity.XCoord = (reader.IsDBNull(((int)NodeColumn.XCoord - 1)))?null:(System.Decimal?)reader[((int)NodeColumn.XCoord - 1)];
			entity.YCoord = (reader.IsDBNull(((int)NodeColumn.YCoord - 1)))?null:(System.Decimal?)reader[((int)NodeColumn.YCoord - 1)];
			entity.NodeType = (reader.IsDBNull(((int)NodeColumn.NodeType - 1)))?null:(System.String)reader[((int)NodeColumn.NodeType - 1)];
			entity.GroundElevation = (System.Decimal)reader[((int)NodeColumn.GroundElevation - 1)];
			entity.HasSpecialNode = (reader.IsDBNull(((int)NodeColumn.HasSpecialNode - 1)))?null:(System.Int32?)reader[((int)NodeColumn.HasSpecialNode - 1)];
			entity.HasSpecialLink = (reader.IsDBNull(((int)NodeColumn.HasSpecialLink - 1)))?null:(System.Int32?)reader[((int)NodeColumn.HasSpecialLink - 1)];
			entity.VirtualGageId = (reader.IsDBNull(((int)NodeColumn.VirtualGageId - 1)))?null:(System.String)reader[((int)NodeColumn.VirtualGageId - 1)];
			entity.DmeGlobalId = (reader.IsDBNull(((int)NodeColumn.DmeGlobalId - 1)))?null:(System.Int32?)reader[((int)NodeColumn.DmeGlobalId - 1)];
			entity.EditedBy = (System.String)reader[((int)NodeColumn.EditedBy - 1)];
			entity.EditReason = (System.String)reader[((int)NodeColumn.EditReason - 1)];
			entity.Status = (System.String)reader[((int)NodeColumn.Status - 1)];
			entity.AppendDate = (System.DateTime)reader[((int)NodeColumn.AppendDate - 1)];
			entity.EditDate = (reader.IsDBNull(((int)NodeColumn.EditDate - 1)))?null:(System.DateTime?)reader[((int)NodeColumn.EditDate - 1)];
			entity.NodeId = (System.Int32)reader[((int)NodeColumn.NodeId - 1)];
			entity.DataQuality = (reader.IsDBNull(((int)NodeColumn.DataQuality - 1)))?null:(System.String)reader[((int)NodeColumn.DataQuality - 1)];
			entity.Shape = (reader.IsDBNull(((int)NodeColumn.Shape - 1)))?null:(System.Object)reader[((int)NodeColumn.Shape - 1)];
			entity.AcceptChanges();
		}
		
		/// <summary>
		/// Refreshes the <see cref="BesAsm.MasterData.Entities.Node"/> object from the <see cref="DataSet"/>.
		/// </summary>
		/// <param name="dataSet">The <see cref="DataSet"/> to read from.</param>
		/// <param name="entity">The <see cref="BesAsm.MasterData.Entities.Node"/> object.</param>
		public static void RefreshEntity(DataSet dataSet, BesAsm.MasterData.Entities.Node entity)
		{
			DataRow dataRow = dataSet.Tables[0].Rows[0];
			
			entity.Objectid = (System.Int32)dataRow["OBJECTID"];
			entity.NodeName = (System.String)dataRow["node_name"];
			entity.OriginalNodeName = (System.String)dataRow["node_name"];
			entity.XCoord = Convert.IsDBNull(dataRow["x_coord"]) ? null : (System.Decimal?)dataRow["x_coord"];
			entity.YCoord = Convert.IsDBNull(dataRow["y_coord"]) ? null : (System.Decimal?)dataRow["y_coord"];
			entity.NodeType = Convert.IsDBNull(dataRow["node_type"]) ? null : (System.String)dataRow["node_type"];
			entity.GroundElevation = (System.Decimal)dataRow["ground_elevation"];
			entity.HasSpecialNode = Convert.IsDBNull(dataRow["has_special_node"]) ? null : (System.Int32?)dataRow["has_special_node"];
			entity.HasSpecialLink = Convert.IsDBNull(dataRow["has_special_link"]) ? null : (System.Int32?)dataRow["has_special_link"];
			entity.VirtualGageId = Convert.IsDBNull(dataRow["virtual_gage_id"]) ? null : (System.String)dataRow["virtual_gage_id"];
			entity.DmeGlobalId = Convert.IsDBNull(dataRow["dme_global_id"]) ? null : (System.Int32?)dataRow["dme_global_id"];
			entity.EditedBy = (System.String)dataRow["edited_by"];
			entity.EditReason = (System.String)dataRow["edit_reason"];
			entity.Status = (System.String)dataRow["status"];
			entity.AppendDate = (System.DateTime)dataRow["append_date"];
			entity.EditDate = Convert.IsDBNull(dataRow["edit_date"]) ? null : (System.DateTime?)dataRow["edit_date"];
			entity.NodeId = (System.Int32)dataRow["node_id"];
			entity.DataQuality = Convert.IsDBNull(dataRow["data_quality"]) ? null : (System.String)dataRow["data_quality"];
			entity.Shape = Convert.IsDBNull(dataRow["SHAPE"]) ? null : (System.Object)dataRow["SHAPE"];
			entity.AcceptChanges();
		}
		#endregion 
		
		#region DeepLoad Methods
		/// <summary>
		/// Deep Loads the <see cref="IEntity"/> object with criteria based of the child 
		/// property collections only N Levels Deep based on the <see cref="DeepLoadType"/>.
		/// </summary>
		/// <remarks>
		/// Use this method with caution as it is possible to DeepLoad with Recursion and traverse an entire object graph.
		/// </remarks>
		/// <param name="transactionManager"><see cref="TransactionManager"/> object</param>
		/// <param name="entity">The <see cref="BesAsm.MasterData.Entities.Node"/> object to load.</param>
		/// <param name="deep">Boolean. A flag that indicates whether to recursively save all Property Collection that are descendants of this instance. If True, saves the complete object graph below this object. If False, saves this object only. </param>
		/// <param name="deepLoadType">DeepLoadType Enumeration to Include/Exclude object property collections from Load.</param>
		/// <param name="childTypes">BesAsm.MasterData.Entities.Node Property Collection Type Array To Include or Exclude from Load</param>
		/// <param name="innerList">A collection of child types for easy access.</param>
	    /// <exception cref="ArgumentNullException">entity or childTypes is null.</exception>
	    /// <exception cref="ArgumentException">deepLoadType has invalid value.</exception>
		public override void DeepLoad(TransactionManager transactionManager, BesAsm.MasterData.Entities.Node entity, bool deep, DeepLoadType deepLoadType, System.Type[] childTypes, DeepSession innerList)
		{
			if(entity == null)
				return;

			#region DataQualitySource	
			if (CanDeepLoad(entity, "DataSource|DataQualitySource", deepLoadType, innerList) 
				&& entity.DataQualitySource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.DataQuality ?? string.Empty);
				DataSource tmpEntity = EntityManager.LocateEntity<DataSource>(EntityLocator.ConstructKeyFromPkItems(typeof(DataSource), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.DataQualitySource = tmpEntity;
				else
					entity.DataQualitySource = DataRepository.DataSourceProvider.GetByDataSourceId(transactionManager, (entity.DataQuality ?? string.Empty));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'DataQualitySource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.DataQualitySource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.DataSourceProvider.DeepLoad(transactionManager, entity.DataQualitySource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion DataQualitySource

			#region NodeTypeSource	
			if (CanDeepLoad(entity, "NodeType|NodeTypeSource", deepLoadType, innerList) 
				&& entity.NodeTypeSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = (entity.NodeType ?? string.Empty);
				NodeType tmpEntity = EntityManager.LocateEntity<NodeType>(EntityLocator.ConstructKeyFromPkItems(typeof(NodeType), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.NodeTypeSource = tmpEntity;
				else
					entity.NodeTypeSource = DataRepository.NodeTypeProvider.GetByNodeTypeId(transactionManager, (entity.NodeType ?? string.Empty));		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'NodeTypeSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.NodeTypeSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.NodeTypeProvider.DeepLoad(transactionManager, entity.NodeTypeSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion NodeTypeSource

			#region StatusSource	
			if (CanDeepLoad(entity, "Status|StatusSource", deepLoadType, innerList) 
				&& entity.StatusSource == null)
			{
				object[] pkItems = new object[1];
				pkItems[0] = entity.Status;
				Status tmpEntity = EntityManager.LocateEntity<Status>(EntityLocator.ConstructKeyFromPkItems(typeof(Status), pkItems), DataRepository.Provider.EnableEntityTracking);
				if (tmpEntity != null)
					entity.StatusSource = tmpEntity;
				else
					entity.StatusSource = DataRepository.StatusProvider.GetByStatusId(transactionManager, entity.Status);		
				
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'StatusSource' loaded. key " + entity.EntityTrackingKey);
				#endif 
				
				if (deep && entity.StatusSource != null)
				{
					innerList.SkipChildren = true;
					DataRepository.StatusProvider.DeepLoad(transactionManager, entity.StatusSource, deep, deepLoadType, childTypes, innerList);
					innerList.SkipChildren = false;
				}
					
			}
			#endregion StatusSource
			
			//used to hold DeepLoad method delegates and fire after all the local children have been loaded.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();
			// Deep load child collections  - Call GetByNodeName methods when available
			
			#region RoofTargetCollection
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<RoofTarget>|RoofTargetCollection", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'RoofTargetCollection' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.RoofTargetCollection = DataRepository.RoofTargetProvider.GetByNodeId(transactionManager, entity.NodeId);

				if (deep && entity.RoofTargetCollection.Count > 0)
				{
					deepHandles.Add("RoofTargetCollection",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<RoofTarget>) DataRepository.RoofTargetProvider.DeepLoad,
						new object[] { transactionManager, entity.RoofTargetCollection, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region OrificeCollectionGetByDsNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Orifice>|OrificeCollectionGetByDsNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'OrificeCollectionGetByDsNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.OrificeCollectionGetByDsNodeId = DataRepository.OrificeProvider.GetByDsNodeId(transactionManager, entity.NodeId);

				if (deep && entity.OrificeCollectionGetByDsNodeId.Count > 0)
				{
					deepHandles.Add("OrificeCollectionGetByDsNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Orifice>) DataRepository.OrificeProvider.DeepLoad,
						new object[] { transactionManager, entity.OrificeCollectionGetByDsNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region SscCollectionGetByAltTraceNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Ssc>|SscCollectionGetByAltTraceNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'SscCollectionGetByAltTraceNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.SscCollectionGetByAltTraceNodeId = DataRepository.SscProvider.GetByAltTraceNodeId(transactionManager, entity.NodeId);

				if (deep && entity.SscCollectionGetByAltTraceNodeId.Count > 0)
				{
					deepHandles.Add("SscCollectionGetByAltTraceNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Ssc>) DataRepository.SscProvider.DeepLoad,
						new object[] { transactionManager, entity.SscCollectionGetByAltTraceNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region SscCollectionGetByNodeIdEx
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Ssc>|SscCollectionGetByNodeIdEx", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'SscCollectionGetByNodeIdEx' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.SscCollectionGetByNodeIdEx = DataRepository.SscProvider.GetByNodeIdEx(transactionManager, entity.NodeId);

				if (deep && entity.SscCollectionGetByNodeIdEx.Count > 0)
				{
					deepHandles.Add("SscCollectionGetByNodeIdEx",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Ssc>) DataRepository.SscProvider.DeepLoad,
						new object[] { transactionManager, entity.SscCollectionGetByNodeIdEx, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region ParkingTargetCollectionGetByNodeIdDsc
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<ParkingTarget>|ParkingTargetCollectionGetByNodeIdDsc", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'ParkingTargetCollectionGetByNodeIdDsc' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.ParkingTargetCollectionGetByNodeIdDsc = DataRepository.ParkingTargetProvider.GetByNodeIdDsc(transactionManager, entity.NodeId);

				if (deep && entity.ParkingTargetCollectionGetByNodeIdDsc.Count > 0)
				{
					deepHandles.Add("ParkingTargetCollectionGetByNodeIdDsc",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<ParkingTarget>) DataRepository.ParkingTargetProvider.DeepLoad,
						new object[] { transactionManager, entity.ParkingTargetCollectionGetByNodeIdDsc, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region ParkingTargetCollectionGetByNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<ParkingTarget>|ParkingTargetCollectionGetByNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'ParkingTargetCollectionGetByNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.ParkingTargetCollectionGetByNodeId = DataRepository.ParkingTargetProvider.GetByNodeId(transactionManager, entity.NodeId);

				if (deep && entity.ParkingTargetCollectionGetByNodeId.Count > 0)
				{
					deepHandles.Add("ParkingTargetCollectionGetByNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<ParkingTarget>) DataRepository.ParkingTargetProvider.DeepLoad,
						new object[] { transactionManager, entity.ParkingTargetCollectionGetByNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region ParkingTargetCollectionGetByNodeIdSsc
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<ParkingTarget>|ParkingTargetCollectionGetByNodeIdSsc", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'ParkingTargetCollectionGetByNodeIdSsc' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.ParkingTargetCollectionGetByNodeIdSsc = DataRepository.ParkingTargetProvider.GetByNodeIdSsc(transactionManager, entity.NodeId);

				if (deep && entity.ParkingTargetCollectionGetByNodeIdSsc.Count > 0)
				{
					deepHandles.Add("ParkingTargetCollectionGetByNodeIdSsc",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<ParkingTarget>) DataRepository.ParkingTargetProvider.DeepLoad,
						new object[] { transactionManager, entity.ParkingTargetCollectionGetByNodeIdSsc, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region SscCollectionGetByNodeIdFu
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Ssc>|SscCollectionGetByNodeIdFu", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'SscCollectionGetByNodeIdFu' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.SscCollectionGetByNodeIdFu = DataRepository.SscProvider.GetByNodeIdFu(transactionManager, entity.NodeId);

				if (deep && entity.SscCollectionGetByNodeIdFu.Count > 0)
				{
					deepHandles.Add("SscCollectionGetByNodeIdFu",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Ssc>) DataRepository.SscProvider.DeepLoad,
						new object[] { transactionManager, entity.SscCollectionGetByNodeIdFu, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region SscZingerCollection
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<SscZinger>|SscZingerCollection", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'SscZingerCollection' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.SscZingerCollection = DataRepository.SscZingerProvider.GetByNodeId(transactionManager, entity.NodeId);

				if (deep && entity.SscZingerCollection.Count > 0)
				{
					deepHandles.Add("SscZingerCollection",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<SscZinger>) DataRepository.SscZingerProvider.DeepLoad,
						new object[] { transactionManager, entity.SscZingerCollection, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region OrificeCollectionGetByUsNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Orifice>|OrificeCollectionGetByUsNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'OrificeCollectionGetByUsNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.OrificeCollectionGetByUsNodeId = DataRepository.OrificeProvider.GetByUsNodeId(transactionManager, entity.NodeId);

				if (deep && entity.OrificeCollectionGetByUsNodeId.Count > 0)
				{
					deepHandles.Add("OrificeCollectionGetByUsNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Orifice>) DataRepository.OrificeProvider.DeepLoad,
						new object[] { transactionManager, entity.OrificeCollectionGetByUsNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region StreetTargetCollection
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<StreetTarget>|StreetTargetCollection", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'StreetTargetCollection' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.StreetTargetCollection = DataRepository.StreetTargetProvider.GetByNodeId(transactionManager, entity.NodeId);

				if (deep && entity.StreetTargetCollection.Count > 0)
				{
					deepHandles.Add("StreetTargetCollection",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<StreetTarget>) DataRepository.StreetTargetProvider.DeepLoad,
						new object[] { transactionManager, entity.StreetTargetCollection, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region WeirCollectionGetByUsNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Weir>|WeirCollectionGetByUsNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'WeirCollectionGetByUsNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.WeirCollectionGetByUsNodeId = DataRepository.WeirProvider.GetByUsNodeId(transactionManager, entity.NodeId);

				if (deep && entity.WeirCollectionGetByUsNodeId.Count > 0)
				{
					deepHandles.Add("WeirCollectionGetByUsNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Weir>) DataRepository.WeirProvider.DeepLoad,
						new object[] { transactionManager, entity.WeirCollectionGetByUsNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region SpecialLinkCollection
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<SpecialLink>|SpecialLinkCollection", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'SpecialLinkCollection' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.SpecialLinkCollection = DataRepository.SpecialLinkProvider.GetByNodeId(transactionManager, entity.NodeId);

				if (deep && entity.SpecialLinkCollection.Count > 0)
				{
					deepHandles.Add("SpecialLinkCollection",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<SpecialLink>) DataRepository.SpecialLinkProvider.DeepLoad,
						new object[] { transactionManager, entity.SpecialLinkCollection, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region WeirCollectionGetByDsNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Weir>|WeirCollectionGetByDsNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'WeirCollectionGetByDsNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.WeirCollectionGetByDsNodeId = DataRepository.WeirProvider.GetByDsNodeId(transactionManager, entity.NodeId);

				if (deep && entity.WeirCollectionGetByDsNodeId.Count > 0)
				{
					deepHandles.Add("WeirCollectionGetByDsNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Weir>) DataRepository.WeirProvider.DeepLoad,
						new object[] { transactionManager, entity.WeirCollectionGetByDsNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region PumpCollectionGetByUsNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Pump>|PumpCollectionGetByUsNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'PumpCollectionGetByUsNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.PumpCollectionGetByUsNodeId = DataRepository.PumpProvider.GetByUsNodeId(transactionManager, entity.NodeId);

				if (deep && entity.PumpCollectionGetByUsNodeId.Count > 0)
				{
					deepHandles.Add("PumpCollectionGetByUsNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Pump>) DataRepository.PumpProvider.DeepLoad,
						new object[] { transactionManager, entity.PumpCollectionGetByUsNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region PumpCollectionGetByDsNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Pump>|PumpCollectionGetByDsNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'PumpCollectionGetByDsNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.PumpCollectionGetByDsNodeId = DataRepository.PumpProvider.GetByDsNodeId(transactionManager, entity.NodeId);

				if (deep && entity.PumpCollectionGetByDsNodeId.Count > 0)
				{
					deepHandles.Add("PumpCollectionGetByDsNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Pump>) DataRepository.PumpProvider.DeepLoad,
						new object[] { transactionManager, entity.PumpCollectionGetByDsNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region LinkCollectionGetByDsNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Link>|LinkCollectionGetByDsNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'LinkCollectionGetByDsNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.LinkCollectionGetByDsNodeId = DataRepository.LinkProvider.GetByDsNodeId(transactionManager, entity.NodeId);

				if (deep && entity.LinkCollectionGetByDsNodeId.Count > 0)
				{
					deepHandles.Add("LinkCollectionGetByDsNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Link>) DataRepository.LinkProvider.DeepLoad,
						new object[] { transactionManager, entity.LinkCollectionGetByDsNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region LinkCollectionGetByUsNodeId
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<Link>|LinkCollectionGetByUsNodeId", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'LinkCollectionGetByUsNodeId' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.LinkCollectionGetByUsNodeId = DataRepository.LinkProvider.GetByUsNodeId(transactionManager, entity.NodeId);

				if (deep && entity.LinkCollectionGetByUsNodeId.Count > 0)
				{
					deepHandles.Add("LinkCollectionGetByUsNodeId",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<Link>) DataRepository.LinkProvider.DeepLoad,
						new object[] { transactionManager, entity.LinkCollectionGetByUsNodeId, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			#region IcNodeRedirectorCollection
			//Relationship Type One : Many
			if (CanDeepLoad(entity, "List<IcNodeRedirector>|IcNodeRedirectorCollection", deepLoadType, innerList)) 
			{
				#if NETTIERS_DEBUG
				System.Diagnostics.Debug.WriteLine("- property 'IcNodeRedirectorCollection' loaded. key " + entity.EntityTrackingKey);
				#endif 

				entity.IcNodeRedirectorCollection = DataRepository.IcNodeRedirectorProvider.GetByNodeId(transactionManager, entity.NodeId);

				if (deep && entity.IcNodeRedirectorCollection.Count > 0)
				{
					deepHandles.Add("IcNodeRedirectorCollection",
						new KeyValuePair<Delegate, object>((DeepLoadHandle<IcNodeRedirector>) DataRepository.IcNodeRedirectorProvider.DeepLoad,
						new object[] { transactionManager, entity.IcNodeRedirectorCollection, deep, deepLoadType, childTypes, innerList }
					));
				}
			}		
			#endregion 
			
			
			//Fire all DeepLoad Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			deepHandles = null;
		}
		
		#endregion 
		
		#region DeepSave Methods

		/// <summary>
		/// Deep Save the entire object graph of the BesAsm.MasterData.Entities.Node object with criteria based of the child 
		/// Type property array and DeepSaveType.
		/// </summary>
		/// <param name="transactionManager">The transaction manager.</param>
		/// <param name="entity">BesAsm.MasterData.Entities.Node instance</param>
		/// <param name="deepSaveType">DeepSaveType Enumeration to Include/Exclude object property collections from Save.</param>
		/// <param name="childTypes">BesAsm.MasterData.Entities.Node Property Collection Type Array To Include or Exclude from Save</param>
		/// <param name="innerList">A Hashtable of child types for easy access.</param>
		public override bool DeepSave(TransactionManager transactionManager, BesAsm.MasterData.Entities.Node entity, DeepSaveType deepSaveType, System.Type[] childTypes, DeepSession innerList)
		{	
			if (entity == null)
				return false;
							
			#region Composite Parent Properties
			//Save Source Composite Properties, however, don't call deep save on them.  
			//So they only get saved a single level deep.
			
			#region DataQualitySource
			if (CanDeepSave(entity, "DataSource|DataQualitySource", deepSaveType, innerList) 
				&& entity.DataQualitySource != null)
			{
				DataRepository.DataSourceProvider.Save(transactionManager, entity.DataQualitySource);
				entity.DataQuality = entity.DataQualitySource.DataSourceId;
			}
			#endregion 
			
			#region NodeTypeSource
			if (CanDeepSave(entity, "NodeType|NodeTypeSource", deepSaveType, innerList) 
				&& entity.NodeTypeSource != null)
			{
				DataRepository.NodeTypeProvider.Save(transactionManager, entity.NodeTypeSource);
				entity.NodeType = entity.NodeTypeSource.NodeTypeId;
			}
			#endregion 
			
			#region StatusSource
			if (CanDeepSave(entity, "Status|StatusSource", deepSaveType, innerList) 
				&& entity.StatusSource != null)
			{
				DataRepository.StatusProvider.Save(transactionManager, entity.StatusSource);
				entity.Status = entity.StatusSource.StatusId;
			}
			#endregion 
			#endregion Composite Parent Properties

			// Save Root Entity through Provider
			if (!entity.IsDeleted)
				this.Save(transactionManager, entity);
			
			//used to hold DeepSave method delegates and fire after all the local children have been saved.
			Dictionary<string, KeyValuePair<Delegate, object>> deepHandles = new Dictionary<string, KeyValuePair<Delegate, object>>();
	
			#region List<RoofTarget>
				if (CanDeepSave(entity.RoofTargetCollection, "List<RoofTarget>|RoofTargetCollection", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(RoofTarget child in entity.RoofTargetCollection)
					{
						if(child.NodeIdSource != null)
						{
							child.NodeId = child.NodeIdSource.NodeId;
						}
						else
						{
							child.NodeId = entity.NodeId;
						}

					}

					if (entity.RoofTargetCollection.Count > 0 || entity.RoofTargetCollection.DeletedItems.Count > 0)
					{
						//DataRepository.RoofTargetProvider.Save(transactionManager, entity.RoofTargetCollection);
						
						deepHandles.Add("RoofTargetCollection",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< RoofTarget >) DataRepository.RoofTargetProvider.DeepSave,
							new object[] { transactionManager, entity.RoofTargetCollection, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Orifice>
				if (CanDeepSave(entity.OrificeCollectionGetByDsNodeId, "List<Orifice>|OrificeCollectionGetByDsNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Orifice child in entity.OrificeCollectionGetByDsNodeId)
					{
						if(child.DsNodeIdSource != null)
						{
							child.DsNodeId = child.DsNodeIdSource.NodeId;
						}
						else
						{
							child.DsNodeId = entity.NodeId;
						}

					}

					if (entity.OrificeCollectionGetByDsNodeId.Count > 0 || entity.OrificeCollectionGetByDsNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.OrificeProvider.Save(transactionManager, entity.OrificeCollectionGetByDsNodeId);
						
						deepHandles.Add("OrificeCollectionGetByDsNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Orifice >) DataRepository.OrificeProvider.DeepSave,
							new object[] { transactionManager, entity.OrificeCollectionGetByDsNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Ssc>
				if (CanDeepSave(entity.SscCollectionGetByAltTraceNodeId, "List<Ssc>|SscCollectionGetByAltTraceNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Ssc child in entity.SscCollectionGetByAltTraceNodeId)
					{
						if(child.AltTraceNodeIdSource != null)
						{
							child.AltTraceNodeId = child.AltTraceNodeIdSource.NodeId;
						}
						else
						{
							child.AltTraceNodeId = entity.NodeId;
						}

					}

					if (entity.SscCollectionGetByAltTraceNodeId.Count > 0 || entity.SscCollectionGetByAltTraceNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.SscProvider.Save(transactionManager, entity.SscCollectionGetByAltTraceNodeId);
						
						deepHandles.Add("SscCollectionGetByAltTraceNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Ssc >) DataRepository.SscProvider.DeepSave,
							new object[] { transactionManager, entity.SscCollectionGetByAltTraceNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Ssc>
				if (CanDeepSave(entity.SscCollectionGetByNodeIdEx, "List<Ssc>|SscCollectionGetByNodeIdEx", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Ssc child in entity.SscCollectionGetByNodeIdEx)
					{
						if(child.NodeIdExSource != null)
						{
							child.NodeIdEx = child.NodeIdExSource.NodeId;
						}
						else
						{
							child.NodeIdEx = entity.NodeId;
						}

					}

					if (entity.SscCollectionGetByNodeIdEx.Count > 0 || entity.SscCollectionGetByNodeIdEx.DeletedItems.Count > 0)
					{
						//DataRepository.SscProvider.Save(transactionManager, entity.SscCollectionGetByNodeIdEx);
						
						deepHandles.Add("SscCollectionGetByNodeIdEx",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Ssc >) DataRepository.SscProvider.DeepSave,
							new object[] { transactionManager, entity.SscCollectionGetByNodeIdEx, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<ParkingTarget>
				if (CanDeepSave(entity.ParkingTargetCollectionGetByNodeIdDsc, "List<ParkingTarget>|ParkingTargetCollectionGetByNodeIdDsc", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(ParkingTarget child in entity.ParkingTargetCollectionGetByNodeIdDsc)
					{
						if(child.NodeIdDscSource != null)
						{
							child.NodeIdDsc = child.NodeIdDscSource.NodeId;
						}
						else
						{
							child.NodeIdDsc = entity.NodeId;
						}

					}

					if (entity.ParkingTargetCollectionGetByNodeIdDsc.Count > 0 || entity.ParkingTargetCollectionGetByNodeIdDsc.DeletedItems.Count > 0)
					{
						//DataRepository.ParkingTargetProvider.Save(transactionManager, entity.ParkingTargetCollectionGetByNodeIdDsc);
						
						deepHandles.Add("ParkingTargetCollectionGetByNodeIdDsc",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< ParkingTarget >) DataRepository.ParkingTargetProvider.DeepSave,
							new object[] { transactionManager, entity.ParkingTargetCollectionGetByNodeIdDsc, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<ParkingTarget>
				if (CanDeepSave(entity.ParkingTargetCollectionGetByNodeId, "List<ParkingTarget>|ParkingTargetCollectionGetByNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(ParkingTarget child in entity.ParkingTargetCollectionGetByNodeId)
					{
						if(child.NodeIdSource != null)
						{
							child.NodeId = child.NodeIdSource.NodeId;
						}
						else
						{
							child.NodeId = entity.NodeId;
						}

					}

					if (entity.ParkingTargetCollectionGetByNodeId.Count > 0 || entity.ParkingTargetCollectionGetByNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.ParkingTargetProvider.Save(transactionManager, entity.ParkingTargetCollectionGetByNodeId);
						
						deepHandles.Add("ParkingTargetCollectionGetByNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< ParkingTarget >) DataRepository.ParkingTargetProvider.DeepSave,
							new object[] { transactionManager, entity.ParkingTargetCollectionGetByNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<ParkingTarget>
				if (CanDeepSave(entity.ParkingTargetCollectionGetByNodeIdSsc, "List<ParkingTarget>|ParkingTargetCollectionGetByNodeIdSsc", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(ParkingTarget child in entity.ParkingTargetCollectionGetByNodeIdSsc)
					{
						if(child.NodeIdSscSource != null)
						{
							child.NodeIdSsc = child.NodeIdSscSource.NodeId;
						}
						else
						{
							child.NodeIdSsc = entity.NodeId;
						}

					}

					if (entity.ParkingTargetCollectionGetByNodeIdSsc.Count > 0 || entity.ParkingTargetCollectionGetByNodeIdSsc.DeletedItems.Count > 0)
					{
						//DataRepository.ParkingTargetProvider.Save(transactionManager, entity.ParkingTargetCollectionGetByNodeIdSsc);
						
						deepHandles.Add("ParkingTargetCollectionGetByNodeIdSsc",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< ParkingTarget >) DataRepository.ParkingTargetProvider.DeepSave,
							new object[] { transactionManager, entity.ParkingTargetCollectionGetByNodeIdSsc, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Ssc>
				if (CanDeepSave(entity.SscCollectionGetByNodeIdFu, "List<Ssc>|SscCollectionGetByNodeIdFu", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Ssc child in entity.SscCollectionGetByNodeIdFu)
					{
						if(child.NodeIdFuSource != null)
						{
							child.NodeIdFu = child.NodeIdFuSource.NodeId;
						}
						else
						{
							child.NodeIdFu = entity.NodeId;
						}

					}

					if (entity.SscCollectionGetByNodeIdFu.Count > 0 || entity.SscCollectionGetByNodeIdFu.DeletedItems.Count > 0)
					{
						//DataRepository.SscProvider.Save(transactionManager, entity.SscCollectionGetByNodeIdFu);
						
						deepHandles.Add("SscCollectionGetByNodeIdFu",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Ssc >) DataRepository.SscProvider.DeepSave,
							new object[] { transactionManager, entity.SscCollectionGetByNodeIdFu, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<SscZinger>
				if (CanDeepSave(entity.SscZingerCollection, "List<SscZinger>|SscZingerCollection", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(SscZinger child in entity.SscZingerCollection)
					{
						if(child.NodeIdSource != null)
						{
							child.NodeId = child.NodeIdSource.NodeId;
						}
						else
						{
							child.NodeId = entity.NodeId;
						}

					}

					if (entity.SscZingerCollection.Count > 0 || entity.SscZingerCollection.DeletedItems.Count > 0)
					{
						//DataRepository.SscZingerProvider.Save(transactionManager, entity.SscZingerCollection);
						
						deepHandles.Add("SscZingerCollection",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< SscZinger >) DataRepository.SscZingerProvider.DeepSave,
							new object[] { transactionManager, entity.SscZingerCollection, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Orifice>
				if (CanDeepSave(entity.OrificeCollectionGetByUsNodeId, "List<Orifice>|OrificeCollectionGetByUsNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Orifice child in entity.OrificeCollectionGetByUsNodeId)
					{
						if(child.UsNodeIdSource != null)
						{
							child.UsNodeId = child.UsNodeIdSource.NodeId;
						}
						else
						{
							child.UsNodeId = entity.NodeId;
						}

					}

					if (entity.OrificeCollectionGetByUsNodeId.Count > 0 || entity.OrificeCollectionGetByUsNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.OrificeProvider.Save(transactionManager, entity.OrificeCollectionGetByUsNodeId);
						
						deepHandles.Add("OrificeCollectionGetByUsNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Orifice >) DataRepository.OrificeProvider.DeepSave,
							new object[] { transactionManager, entity.OrificeCollectionGetByUsNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<StreetTarget>
				if (CanDeepSave(entity.StreetTargetCollection, "List<StreetTarget>|StreetTargetCollection", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(StreetTarget child in entity.StreetTargetCollection)
					{
						if(child.NodeIdSource != null)
						{
							child.NodeId = child.NodeIdSource.NodeId;
						}
						else
						{
							child.NodeId = entity.NodeId;
						}

					}

					if (entity.StreetTargetCollection.Count > 0 || entity.StreetTargetCollection.DeletedItems.Count > 0)
					{
						//DataRepository.StreetTargetProvider.Save(transactionManager, entity.StreetTargetCollection);
						
						deepHandles.Add("StreetTargetCollection",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< StreetTarget >) DataRepository.StreetTargetProvider.DeepSave,
							new object[] { transactionManager, entity.StreetTargetCollection, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Weir>
				if (CanDeepSave(entity.WeirCollectionGetByUsNodeId, "List<Weir>|WeirCollectionGetByUsNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Weir child in entity.WeirCollectionGetByUsNodeId)
					{
						if(child.UsNodeIdSource != null)
						{
							child.UsNodeId = child.UsNodeIdSource.NodeId;
						}
						else
						{
							child.UsNodeId = entity.NodeId;
						}

					}

					if (entity.WeirCollectionGetByUsNodeId.Count > 0 || entity.WeirCollectionGetByUsNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.WeirProvider.Save(transactionManager, entity.WeirCollectionGetByUsNodeId);
						
						deepHandles.Add("WeirCollectionGetByUsNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Weir >) DataRepository.WeirProvider.DeepSave,
							new object[] { transactionManager, entity.WeirCollectionGetByUsNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<SpecialLink>
				if (CanDeepSave(entity.SpecialLinkCollection, "List<SpecialLink>|SpecialLinkCollection", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(SpecialLink child in entity.SpecialLinkCollection)
					{
						if(child.NodeIdSource != null)
						{
							child.NodeId = child.NodeIdSource.NodeId;
						}
						else
						{
							child.NodeId = entity.NodeId;
						}

					}

					if (entity.SpecialLinkCollection.Count > 0 || entity.SpecialLinkCollection.DeletedItems.Count > 0)
					{
						//DataRepository.SpecialLinkProvider.Save(transactionManager, entity.SpecialLinkCollection);
						
						deepHandles.Add("SpecialLinkCollection",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< SpecialLink >) DataRepository.SpecialLinkProvider.DeepSave,
							new object[] { transactionManager, entity.SpecialLinkCollection, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Weir>
				if (CanDeepSave(entity.WeirCollectionGetByDsNodeId, "List<Weir>|WeirCollectionGetByDsNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Weir child in entity.WeirCollectionGetByDsNodeId)
					{
						if(child.DsNodeIdSource != null)
						{
							child.DsNodeId = child.DsNodeIdSource.NodeId;
						}
						else
						{
							child.DsNodeId = entity.NodeId;
						}

					}

					if (entity.WeirCollectionGetByDsNodeId.Count > 0 || entity.WeirCollectionGetByDsNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.WeirProvider.Save(transactionManager, entity.WeirCollectionGetByDsNodeId);
						
						deepHandles.Add("WeirCollectionGetByDsNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Weir >) DataRepository.WeirProvider.DeepSave,
							new object[] { transactionManager, entity.WeirCollectionGetByDsNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Pump>
				if (CanDeepSave(entity.PumpCollectionGetByUsNodeId, "List<Pump>|PumpCollectionGetByUsNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Pump child in entity.PumpCollectionGetByUsNodeId)
					{
						if(child.UsNodeIdSource != null)
						{
							child.UsNodeId = child.UsNodeIdSource.NodeId;
						}
						else
						{
							child.UsNodeId = entity.NodeId;
						}

					}

					if (entity.PumpCollectionGetByUsNodeId.Count > 0 || entity.PumpCollectionGetByUsNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.PumpProvider.Save(transactionManager, entity.PumpCollectionGetByUsNodeId);
						
						deepHandles.Add("PumpCollectionGetByUsNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Pump >) DataRepository.PumpProvider.DeepSave,
							new object[] { transactionManager, entity.PumpCollectionGetByUsNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Pump>
				if (CanDeepSave(entity.PumpCollectionGetByDsNodeId, "List<Pump>|PumpCollectionGetByDsNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Pump child in entity.PumpCollectionGetByDsNodeId)
					{
						if(child.DsNodeIdSource != null)
						{
							child.DsNodeId = child.DsNodeIdSource.NodeId;
						}
						else
						{
							child.DsNodeId = entity.NodeId;
						}

					}

					if (entity.PumpCollectionGetByDsNodeId.Count > 0 || entity.PumpCollectionGetByDsNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.PumpProvider.Save(transactionManager, entity.PumpCollectionGetByDsNodeId);
						
						deepHandles.Add("PumpCollectionGetByDsNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Pump >) DataRepository.PumpProvider.DeepSave,
							new object[] { transactionManager, entity.PumpCollectionGetByDsNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Link>
				if (CanDeepSave(entity.LinkCollectionGetByDsNodeId, "List<Link>|LinkCollectionGetByDsNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Link child in entity.LinkCollectionGetByDsNodeId)
					{
						if(child.DsNodeIdSource != null)
						{
							child.DsNodeId = child.DsNodeIdSource.NodeId;
						}
						else
						{
							child.DsNodeId = entity.NodeId;
						}

					}

					if (entity.LinkCollectionGetByDsNodeId.Count > 0 || entity.LinkCollectionGetByDsNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.LinkProvider.Save(transactionManager, entity.LinkCollectionGetByDsNodeId);
						
						deepHandles.Add("LinkCollectionGetByDsNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Link >) DataRepository.LinkProvider.DeepSave,
							new object[] { transactionManager, entity.LinkCollectionGetByDsNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<Link>
				if (CanDeepSave(entity.LinkCollectionGetByUsNodeId, "List<Link>|LinkCollectionGetByUsNodeId", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(Link child in entity.LinkCollectionGetByUsNodeId)
					{
						if(child.UsNodeIdSource != null)
						{
							child.UsNodeId = child.UsNodeIdSource.NodeId;
						}
						else
						{
							child.UsNodeId = entity.NodeId;
						}

					}

					if (entity.LinkCollectionGetByUsNodeId.Count > 0 || entity.LinkCollectionGetByUsNodeId.DeletedItems.Count > 0)
					{
						//DataRepository.LinkProvider.Save(transactionManager, entity.LinkCollectionGetByUsNodeId);
						
						deepHandles.Add("LinkCollectionGetByUsNodeId",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< Link >) DataRepository.LinkProvider.DeepSave,
							new object[] { transactionManager, entity.LinkCollectionGetByUsNodeId, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
	
			#region List<IcNodeRedirector>
				if (CanDeepSave(entity.IcNodeRedirectorCollection, "List<IcNodeRedirector>|IcNodeRedirectorCollection", deepSaveType, innerList)) 
				{	
					// update each child parent id with the real parent id (mostly used on insert)
					foreach(IcNodeRedirector child in entity.IcNodeRedirectorCollection)
					{
						if(child.NodeIdSource != null)
						{
							child.NodeId = child.NodeIdSource.NodeId;
						}
						else
						{
							child.NodeId = entity.NodeId;
						}

					}

					if (entity.IcNodeRedirectorCollection.Count > 0 || entity.IcNodeRedirectorCollection.DeletedItems.Count > 0)
					{
						//DataRepository.IcNodeRedirectorProvider.Save(transactionManager, entity.IcNodeRedirectorCollection);
						
						deepHandles.Add("IcNodeRedirectorCollection",
						new KeyValuePair<Delegate, object>((DeepSaveHandle< IcNodeRedirector >) DataRepository.IcNodeRedirectorProvider.DeepSave,
							new object[] { transactionManager, entity.IcNodeRedirectorCollection, deepSaveType, childTypes, innerList }
						));
					}
				} 
			#endregion 
				
			//Fire all DeepSave Items
			foreach(KeyValuePair<Delegate, object> pair in deepHandles.Values)
		    {
                pair.Key.DynamicInvoke((object[])pair.Value);
		    }
			
			// Save Root Entity through Provider, if not already saved in delete mode
			if (entity.IsDeleted)
				this.Save(transactionManager, entity);
				

			deepHandles = null;
						
			return true;
		}
		#endregion
	} // end class
	
	#region NodeChildEntityTypes
	
	///<summary>
	/// Enumeration used to expose the different child entity types 
	/// for child properties in <c>BesAsm.MasterData.Entities.Node</c>
	///</summary>
	public enum NodeChildEntityTypes
	{
		
		///<summary>
		/// Composite Property for <c>DataSource</c> at DataQualitySource
		///</summary>
		[ChildEntityType(typeof(DataSource))]
		DataSource,
			
		///<summary>
		/// Composite Property for <c>NodeType</c> at NodeTypeSource
		///</summary>
		[ChildEntityType(typeof(NodeType))]
		NodeType,
			
		///<summary>
		/// Composite Property for <c>Status</c> at StatusSource
		///</summary>
		[ChildEntityType(typeof(Status))]
		Status,
	
		///<summary>
		/// Collection of <c>Node</c> as OneToMany for RoofTargetCollection
		///</summary>
		[ChildEntityType(typeof(TList<RoofTarget>))]
		RoofTargetCollection,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for OrificeCollection
		///</summary>
		[ChildEntityType(typeof(TList<Orifice>))]
		OrificeCollectionGetByDsNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for SscCollection
		///</summary>
		[ChildEntityType(typeof(TList<Ssc>))]
		SscCollectionGetByAltTraceNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for SscCollection
		///</summary>
		[ChildEntityType(typeof(TList<Ssc>))]
		SscCollectionGetByNodeIdEx,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for ParkingTargetCollection
		///</summary>
		[ChildEntityType(typeof(TList<ParkingTarget>))]
		ParkingTargetCollectionGetByNodeIdDsc,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for ParkingTargetCollection
		///</summary>
		[ChildEntityType(typeof(TList<ParkingTarget>))]
		ParkingTargetCollectionGetByNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for ParkingTargetCollection
		///</summary>
		[ChildEntityType(typeof(TList<ParkingTarget>))]
		ParkingTargetCollectionGetByNodeIdSsc,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for SscCollection
		///</summary>
		[ChildEntityType(typeof(TList<Ssc>))]
		SscCollectionGetByNodeIdFu,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for SscZingerCollection
		///</summary>
		[ChildEntityType(typeof(TList<SscZinger>))]
		SscZingerCollection,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for OrificeCollection
		///</summary>
		[ChildEntityType(typeof(TList<Orifice>))]
		OrificeCollectionGetByUsNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for StreetTargetCollection
		///</summary>
		[ChildEntityType(typeof(TList<StreetTarget>))]
		StreetTargetCollection,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for WeirCollection
		///</summary>
		[ChildEntityType(typeof(TList<Weir>))]
		WeirCollectionGetByUsNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for SpecialLinkCollection
		///</summary>
		[ChildEntityType(typeof(TList<SpecialLink>))]
		SpecialLinkCollection,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for WeirCollection
		///</summary>
		[ChildEntityType(typeof(TList<Weir>))]
		WeirCollectionGetByDsNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for PumpCollection
		///</summary>
		[ChildEntityType(typeof(TList<Pump>))]
		PumpCollectionGetByUsNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for PumpCollection
		///</summary>
		[ChildEntityType(typeof(TList<Pump>))]
		PumpCollectionGetByDsNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for LinkCollection
		///</summary>
		[ChildEntityType(typeof(TList<Link>))]
		LinkCollectionGetByDsNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for LinkCollection
		///</summary>
		[ChildEntityType(typeof(TList<Link>))]
		LinkCollectionGetByUsNodeId,

		///<summary>
		/// Collection of <c>Node</c> as OneToMany for IcNodeRedirectorCollection
		///</summary>
		[ChildEntityType(typeof(TList<IcNodeRedirector>))]
		IcNodeRedirectorCollection,
	}
	
	#endregion NodeChildEntityTypes
	
	#region NodeFilterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="SqlFilterBuilder&lt;NodeColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Node"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class NodeFilterBuilder : SqlFilterBuilder<NodeColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NodeFilterBuilder class.
		/// </summary>
		public NodeFilterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the NodeFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public NodeFilterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the NodeFilterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public NodeFilterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion NodeFilterBuilder
	
	#region NodeParameterBuilder
	
	/// <summary>
	/// A strongly-typed instance of the <see cref="ParameterizedSqlFilterBuilder&lt;NodeColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Node"/> object.
	/// </summary>
	[CLSCompliant(true)]
	public class NodeParameterBuilder : ParameterizedSqlFilterBuilder<NodeColumn>
	{
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NodeParameterBuilder class.
		/// </summary>
		public NodeParameterBuilder() : base() { }

		/// <summary>
		/// Initializes a new instance of the NodeParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		public NodeParameterBuilder(bool ignoreCase) : base(ignoreCase) { }

		/// <summary>
		/// Initializes a new instance of the NodeParameterBuilder class.
		/// </summary>
		/// <param name="ignoreCase">Specifies whether to create case-insensitive statements.</param>
		/// <param name="useAnd">Specifies whether to combine statements using AND or OR.</param>
		public NodeParameterBuilder(bool ignoreCase, bool useAnd) : base(ignoreCase, useAnd) { }

		#endregion Constructors
	}

	#endregion NodeParameterBuilder
	
	#region NodeSortBuilder
    
    /// <summary>
    /// A strongly-typed instance of the <see cref="SqlSortBuilder&lt;NodeColumn&gt;"/> class
	/// that is used exclusively with a <see cref="Node"/> object.
    /// </summary>
    [CLSCompliant(true)]
    public class NodeSortBuilder : SqlSortBuilder<NodeColumn>
    {
		#region Constructors

		/// <summary>
		/// Initializes a new instance of the NodeSqlSortBuilder class.
		/// </summary>
		public NodeSortBuilder() : base() { }

		#endregion Constructors

    }    
    #endregion NodeSortBuilder
	
} // end namespace
